package com.panghl.controller;

import com.panghl.service.StatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/stat")
public class StatController {
    @Autowired
    private StatService statService;
    @GetMapping(value = "/columnCharts",name = "统计各部门人数，柱状图")
    public List<Map> columnCharts(){
        return  statService.columnCharts();
    }

    @GetMapping(value = "/lineCharts",name = "月份入职人数统计，折线图")
    public List<Map> lineCharts(){
        return  statService.lineCharts();
    }
    @GetMapping(value = "/pieCharts",name = "公司员工地方来源，包括省、市")
    public List<Map> pieCharts(){
        return  statService.pieCharts();
    }
    @GetMapping(value = "/pieECharts",name = "公司员工地方来源，包括省、市")
    public Map  pieECharts(){
        return  statService.pieECharts();
    }
}
